<?php

if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
if ($curruser['prev_id'] != 0 && SubAccountRight($curruser, 4) != 2)
{
    exit();
}
require_once( "class_3d/CheckMode_3d.php" );
$gametype = intval(getvar("gametype"));
$chk = new CheckMode_3d($curruser['acl'], 1, $gametype);
$chk->checkShow3dPage();
$show3D3S = $chk->show3D3S;
$showPg = $g_gametype_3d[$gametype]['pg'];
unset($chk);
if ($fp != "amount1_3d" && $fp != "chkbet")
{
    unset($_SESSION['CHK_master_account_OK']);
}
$conf = new Config();
$del_dat_mode = intval($conf->get("data_del_mode"));
$del_user_mode = intval($conf->get("user_del_mode"));
$say_mode = intval($conf->get("unus_say_mode"));
$masteracc = $conf->get("master_account");
echo title($g_gametype_3d[$gametype]['ch'] . "系统管理", "", "900");
echo "<p>";
echo "<table border=0 cellpadding=0 cellspacing=0>";
echo "<tr valign=top><td>";
echo "<table border=0 cellpadding=5 cellspacing=0 width=145>";
echo "<tr><td ><a href='?op=admin&fp=admin_3d&gametype={$gametype}'>系统设定</a><br>";
echo "<tr ><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=srate{$showPg}&gametype={$gametype}\">基本赔率设定</a><br>";
if ($curruser['acl'] == 255 && !isset($_SESSION['subaccount']))
{
    echo "<tr><td><a href=\"?op=admin&fp=amountchkpass&gametype={$gametype}\">基本退水设定</a><br>";
}
echo "<tr><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=autorate{$showPg}&gametype={$gametype}\">自动赔率设定</a><br>";
//echo "<tr><td><a href='?op=admin&fp=editupuser&gametype={$gametype}'>走飞站名设定</a><br>";
echo "<tr><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=bet_backup{$showPg}&gametype={$gametype}\">注单明细下载</a><br>";
echo "<tr><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=modify_3d&gametype={$gametype}\">占成及额度变更记录</a><br>";
echo "<tr><td><a href='?op=admin&fp=online&gametype={$gametype}'>线上人员</a><br>";
echo "<tr><td><a href='?op=admin&fp=findmember&gametype={$gametype}'>会员搜寻</a><br>";
echo "<tr><td><a href='?op=admin&fp=chgpwd&gametype={$gametype}'>变更密码</a><br>";
echo "<tr><td><a href='?op=admin&fp=stopmember&gametype={$gametype}'>停用闲置会员</a><br>";
if ($say_mode == 1)
{
    echo "<tr><td><a href='?op=admin&fp=unusualbet'>查询异常注单</a><br>";
}
if ($del_dat_mode == 1)
{
    echo "<tr><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=delbet1{$showPg}&gametype={$gametype}\">注单取消&nbsp;/&nbsp;重整</a><br>";
}
if (in_array($show3D3S, array(1, 2)) && $curruser['acl'] == 255 && $curruser['prev_id'] == 0)
{
    echo "<tr><td><a href=\"?op=admin&fp=calcAmountsFloat_3d&gametype={$gametype}\">时时彩浮动额度纪录管理</a><br>";
}
if ($say_mode == 1)
{
    echo "<tr><td><a href='?op=admin&fp=unusualbet&gametype={$gametype}'>查询异常注单</a><br>";
}
if ($del_user_mode == 1)
{
    echo "<tr><td><a href='?op=admin&fp=delemember&gametype={$gametype}'>删除停用资料</a><br>";
}
if ($curruser['account'] == G_SUPERACCOUNT && $curruser['acl'] == 255)
{
    if ($del_dat_mode == 0)
    {
        echo "<tr><td nowrap=\"nowrap\"><a href=\"?op=admin&fp=delbet1{$showPg}&gametype={$gametype}\">注单取消&nbsp;/&nbsp;重整</a><br>";
    }
    echo "<tr><td><a href='?op=admin&fp=backup&gametype={$gametype}'>SQL备份</a><br>";
    if ($del_user_mode == 0)
    {
        echo "<tr><td><a href='?op=admin&fp=delemember&gametype={$gametype}'>删除停用资料</a><br>";
    }
    echo "<tr><td><a href='?op=admin&fp=dbopt&gametype={$gametype}'>资料库最佳化</a><br>";
    echo "<tr><td><a href='?op=admin&fp=dbdel&gametype={$gametype}'>资料表清除</a><br>";
    echo "<tr><td><a href='?op=admin&fp=setInitMode&gametype={$gametype}'>博奕类别设定</a><br>";
    echo "<tr><td><a href='?op=admin&fp=reCalc{$showPg}&gametype={$gametype}'>重新颁奖过帐</a><br>";
    if ($say_mode == 0)
    {
        echo "<tr><td><a href='?op=admin&fp=unusualbet&gametype={$gametype}'>查询异常事件</a><br>";
    }
    echo "<tr><td><a href='?op=admin&fp=dttest_3d&gametype={$gametype}'>日期时间转换</a><br>";
    echo "<tr><td><a href='?op=admin&fp=dbdel_bettotal&gametype={$gametype}'>清除BetTotal_XX</a><br>";
    echo "<tr><td><a href='?op=admin&fp=upgrade_3d&gametype={$gametype}'>◎资料库升级◎</a><br>";
}
echo "<tr><td><a href='?op=admin&fp=chkbet&gametype={$gametype}'>查询异常注单</a><br>";
echo "</table>";
echo "<td>";
?>